package request
import "mime/multipart"


type GetObjectType uint8
const  (
	Presigned GetObjectType = iota
	Base64
	Download
)
 
type GetObjectReq struct {
	BucketName string `json:"BucketName"`
	ObjectName string `json:"ObjectName"`
	GetObjectType GetObjectType `json:"GetObjectType"`
	ExpireTime int64   `json:"ExpireTime,omitempty"`//0是永久
}

type PutObjectReq struct {
	BucketName string `form:"BucketName"`
	ObjectName string `form:"ObjectName"`
	File       *multipart.FileHeader `form:"File"`
}

type GetObjectsReq struct {
	BucketName string	
	Prefix     string	// 文件前缀
}

type GetObjectInfoReq struct {
	BucketName string `json:"BucketName"`
	ObjectName string `json:"ObjectName"`
}

type FGetObjectReq struct {
	BucketName string `json:"BucketName"`
	ObjectName string `json:"ObjectName"`
	FilePath   string `json:"FilePath"`
}

type FPutObjectReq struct {
	BucketName string `json:"BucketName"`
	ObjectName string `json:"ObjectName"`
	FilePath   string `json:"FilePath"`
}

// type CreateObjectReq struct {
// 	BucketName string    `json:"BucketName"`
// 	ObjectName string    `json:"ObjectName"`
// 	Reader     io.Reader `json:"Reader"`
// 	ObjectSize int64     `json:"ObjectSize,omitempty"`
// }

type DeleteObjectReq struct {
	BucketName string `json:"BucketName"`
	ObjectName string `json:"ObjectName"`
}

type CreateBucketReq struct {
	BucketName string `json:"BucketName"`
}

type GetBucketStatsReq struct {
	BucketName string 
}

type GetBucketPolicyReq struct {
	BucketName string 
}

type SetBucketPolicyReq struct {
	BucketName string `json:"-"`
	Policy string `json:"Policy"`
}

type RemoveBucketReq struct {
	BucketName string `json:"BucketName"`
}

type ModifyObjectReq struct {
	BucketName string `json:"BucketName"`
	NewBucketName string `json:"NewBucketName,omitempty"`
	ObjectName    string `json:"ObjectName"`
	NewObjectName    string `json:"NewObjectName,omitempty"`
}
// type UnzipReq struct {
// 	ObjectPath     string `json:"ObjectPath"`
// 	TargetFilePath string `json:"TargetPath"`
// }
